package com.jfl.model;

import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.google.common.collect.Lists;
import com.jfl.base.BaseModel;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 菜单
 *  
 * @author  赵炎
 * @version  [V1.00, 2019年5月6日]
 * @since V1.00
 */
@SuppressWarnings("serial")
@TableName("tbl_sys_menu")
@Data
@EqualsAndHashCode(callSuper = false)
public class SysMenu extends BaseModel
{
    
    private String menuName;
    
    private String menuType;
    
    @JsonSerialize(using=ToStringSerializer.class)
    private Long parentId;
    
    @TableField(exist=false)
    private String parentName;
    
    private String url;
    
    private String icon;
    
    private Integer sortNo;
    
    private String status;
    
    private String visible;
    
    private String permissions;
    @TableField(exist=false)
    private List<SysMenu> children = Lists.newArrayList();
    
}
